package com.webshop.JavaBean;

import java.util.List;

/**
 * CREATE TABLE `order`  (
 `ID` int(20) NOT NULL AUTO_INCREMENT,
 `orderID` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `userName` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `creattime` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `addressee` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
 `totalprice` decimal(20, 2) NOT NULL,
 `state` int(2) NOT NULL,
 PRIMARY KEY (`ID`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
 */
public class Order {
    int ID;
    String orderID;
    String userName;
    String creattime;
    String addressee;
    String address;


    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public String getOrderID() {
        return orderID;
    }

    public void setOrderID(String orderID) {
        this.orderID = orderID;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCreattime() {
        return creattime;
    }

    public void setCreattime(String creattime) {
        this.creattime = creattime;
    }

    public String getAddressee() {
        return addressee;
    }

    public void setAddressee(String addressee) {
        this.addressee = addressee;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public double getTotalprice() {
        return totalprice;
    }

    public void setTotalprice(double totalprice) {
        this.totalprice = totalprice;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    String phone;
    double totalprice;
    int state;


    public List<Detail_order> getDetail_order() {
        return detail_order;
    }

    public void setDetail_order(List<Detail_order> detail_order) {
        this.detail_order = detail_order;
    }

    List<Detail_order> detail_order;



    public Order()
    {

    }


    public Order(String orderID, String userName, String creattime, String addressee, String address, String phone, double totalprice, int state) {
        this.orderID = orderID;
        this.userName = userName;
        this.creattime = creattime;
        this.addressee = addressee;
        this.address = address;
        this.phone = phone;
        this.totalprice = totalprice;
        this.state = state;
    }

    @Override
    public String toString() {
        return "Order{" +
                "ID=" + ID +
                ", orderID='" + orderID + '\'' +
                ", userName='" + userName + '\'' +
                ", creattime='" + creattime + '\'' +
                ", addressee='" + addressee + '\'' +
                ", phone='" + phone + '\'' +
                ", totalprice=" + totalprice +
                ", state=" + state +
                ", detail_order=" + detail_order +
                '}';
    }
}
